package com.hotline.monitor.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public enum SkillMediaTypeEnum {

    STATE("1","文字交谈"),
    CLICK_TO_CALL("2","点击通话"),
    CALLBACK_REQUEST("4","回呼请求"),
    VIDEO_ALLS("5","普通音视频电话"),
    PREDICT_OUTGOING("15","预测呼出"),
    PRE_BROWSING_CALL_OUT("16","预浏览呼出"),
    MESSAGE_CALL("17","消息呼叫"),
    VIDEO_ORDINARY_CALL("19","视频普通呼叫"),
    WEB_CHAT("51","多媒体Web Chat"),
    SOCIAL_CHAT("53","Social Chat");




    /**
     * 编码
     */
    private String code;

    /**
     * 名称
     */
    private String name;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }



    SkillMediaTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static SkillMediaTypeEnum getSkillMediaTypeEnum(String code){
        for (SkillMediaTypeEnum levelEnum : SkillMediaTypeEnum.values()){
            if(levelEnum.getCode().equals(code)){
                return levelEnum;
            }
        }
        return null;
    }

    public static List getSkillMediaTypeEnumList(){
        List list = new ArrayList();
        for (SkillMediaTypeEnum levelEnum : SkillMediaTypeEnum.values()){
            Map map = new HashMap<>();
            map.put("code",levelEnum.getCode());
            map.put("name",levelEnum.getName());
            list.add(map);
        }
        return list;
    }
}
